#include <stdio.h>
#include <time.h>

/**
 * 题目：时间函数举例3
*/
int main(int argc, char const *argv[])
{
    long i = 10000000L;
    clock_t start, finish;
    double the_time;
    printf("做%ld次空循环需要的时间为", i);
    start = clock();
    while (i--);
    finish = clock();
    the_time = (double) (finish - start) / CLOCKS_PER_SEC;
    printf("%f秒。\n", the_time);

    return 0;
}